//
//  PickView.m
//  WGFGlobalHouses
//
//  Created by waiguofang on 15/4/30.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//

#import "PickView.h"

@interface PickView ()<UIPickerViewDataSource,UIPickerViewDelegate>




-(IBAction)clickBtn;
@end

@implementation PickView


+(instancetype)pickViewInitWithXib
{
    return [[[NSBundle mainBundle]loadNibNamed:@"PickView" owner:nil options:nil]lastObject];
}
-(IBAction)clickBtn;
{
    NSLog(@"点击了按钮");
}


- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component;
{
    if (component == 0)
    {
        return @"所在地区";
    }
    else
    {
        return @"区域";
    }
}
// returns the number of 'columns' to display.
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView;
{
    return 2;
}

// returns the # of rows in each component..
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component;
{
    return 10;
}

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component;
{
    NSLog(@"点击了 %d行，%d列",component,row);
}
@end
